﻿using System;
using System.Data.SqlClient;
using System.Web.UI;
using UDS.Components;

namespace UDS.SubModule.Linkman
{
    /// <summary>
    /// StaffInfo 的摘要说明。
    /// </summary>
    public partial class StaffInfoPage : Page
    {
        protected override void OnLoad(EventArgs e)
        {
            var staff = new Components.Staff();
            int staffid = (string.IsNullOrEmpty(Request.QueryString["Staff_ID"])) ? 0 : Int32.Parse(Request.QueryString["Staff_ID"]);
            var staffInfo = Staff.GetStaffInfo(staffid);
            if (staffInfo != null)
            {
                ltl_Name.Text = staffInfo.RealName;
                ltl_Gender.Text = staffInfo.SexStr;
                ltl_Mobile.Text = staffInfo.Mobile;
                ltl_Email.Text = staffInfo.Email;
                ltl_UnitTelephone.Text = staffInfo.Phone;
                ltl_Birthday.Text = Utility.FormatDate(staffInfo.Birthday);
                ltl_Position.Text = staffInfo.PositionName;
                ltl_RD.Text = Utility.FormatDate(staffInfo.TimeRegistered);
            }

            base.OnLoad(e);
        }
    }
}